
<div class="row animate fadeIn">
    <div class="form-horizontal"> 
        <form id=""  method="post">
      <div class="ibox-title" style="border:none;"><h5 style="color: #00afef"><i>View Charge Elements</i></h5>
        
        <?php foreach($data as $chg) { ?>
      </div>
        <div class="ibox-content">
            <div class="form-group"><label class="col-lg-3 control-label">Charge Code</label>
                <div class="col-lg-10 input-s">
                    <input type="text" name = "chg_code" class="form-control" value="<?php echo $chg->charge_code; ?>" readonly>
                </div>
            </div>
            <div class="form-group"><label class="col-lg-3 control-label">Charge Name</label> 
                <div class="col-lg-11 input-s">
                    <input type="text" name="e_chg_name" class="form-control" value="<?php echo $chg->charge_name; ?>" readonly>
                </div>
            </div>
            <div class="form-group"><label class="col-lg-3 control-label">Description</label> 
                <div class="col-lg-11 input-s">
                    <input type="text" name="e_chg_desc" class="form-control" value="<?php echo $chg->description; ?>" readonly>
                </div>
            </div>
            <div class="form-group">
                <label class="col-lg-3 control-label">Compute Engine</label>
                    <div class="col-lg-10 input-s">
                    <select style="width: 159px;" id="engine_com" class="chosen-select" name="e_chg_eng" disabled>
                        <option value=""></option>
                        <?php foreach ($engine as $eng) { ?>
                            <option value="<?php echo $eng->compute_engine; ?>" <?php echo($eng->compute_engine == $chg->compute_engine ? 'selected' : '' ); ?> ><?php echo $eng->meaning; ?></option>
                        <?php } ?>
                    </select>
                    </div>    
            </div>
            
        <?php } ?>   
    </form>
    </div>
    <table class="table table-bordered" style="width:68%;" align="center">
                    <thead>
                        <tr>
                            <th style="text-align:left;width:100px;" >Option Code</th>
                            <th style="text-align:left;" >Option Name</th>
                            <th style="text-align:right;width:100px;">Option value</th>
                            <th style="text-align:center;width:100px;">Enable</th>
                        </tr>
                    </thead>
                    <tbody id="resultfound">
                        
                        <?php foreach ($opt_data as $opt) { 
                        $chk = "hover";
                        if($opt->enable_flag == 'Y'){
                                $chk = "checked";
                            } 
                        ?>
                        <tr>
                            <td id="<?php echo $opt->option_code; ?>" style="text-align:left; "><div class=""><?php echo $opt->option_code; ?></div></td>
                            <td id="<?php echo $opt->option_code; ?>" style="text-align:left; "><div class=""><?php echo $opt->option_name; ?></div></td>
                            <td id="<?php echo $opt->option_code; ?>" style="text-align:right;"><span class="op_val"><?php echo $opt->option_value; ?></span></td>
                            <td id="<?php echo $opt->option_code; ?>" style="text-align:center;"><div style="cursor:default;" id="dbox" class="state icheckbox_square-green <?php echo $chk; ?>"></div></td>
                            </tr>
                        <?php } ?>
                        
                    </tbody>
        </table>
    </div>
</div>
<script>
    $(document).ready(function(){
        $(".chosen-select").chosen({width:"95%;"});
        $('#viewX').click(function(){
           close_view();
        });
    });
</script>